package com.huang.single;

import java.lang.reflect.Constructor;

// 枚举是一个类
public enum EnumSingle {
    INSTANCE;
    public EnumSingle getInstance(){
        return INSTANCE ;
    }
}
class Test{
    public static void main(String[] args) throws Exception {
        EnumSingle enumSingle1=EnumSingle.INSTANCE;
        Constructor<EnumSingle> declaredConstructor = EnumSingle.class.getDeclaredConstructor(String.class,int.class);
        EnumSingle enumSingle2 = declaredConstructor.newInstance();
        System.out.println(enumSingle1);
        System.out.println(enumSingle2);
    }
}